'use strict';

const Service = require('egg').Service;

class ColumnsService extends Service {
    /**
     * 注册流程
     * @param {*} param0
     */
    async save({ id, title, pid }) {
        let sql =
            'insert into columns (id, title, pid, create_at) value (?, ?, ?, ?)';
        return await this.app.mysql.query(sql, [id, title, pid, Date.now()]);
    }
}

module.exports = ColumnsService;
